package com.leapp.sk.ui.adapter

import android.content.Context
import com.example.mvp.adapter.BaseLibAdapter
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.bean.ChoseClassEntity
import com.leapp.sk.binder.BaseBinder
import com.leapp.sk.viewdelegate.adapter.classs.TopChoseClassAdapterDelegate

/**
 * 顶部选择班级适配器
 * @author  chaohaipeng  on 2018/8/14.
 */
class TopChoseClassAdapter (context: Context, mlist: List<ChoseClassEntity>) : BaseLibAdapter<TopChoseClassAdapterDelegate, ChoseClassEntity>(context, mlist){
    /**
     * 数据
     */
    val mList = mlist
    /**
     * 上下文
     */
    val mContext = context
    override fun bindEvenListener(viewDelegate: TopChoseClassAdapterDelegate?, position: Int) {
    }

    override fun notifyView(viewDelegate: TopChoseClassAdapterDelegate?, position: Int) {
        viewDelegate?.initData(mList.get(position))
    }

    override fun getDelegateClass(): Class<TopChoseClassAdapterDelegate> {
        return TopChoseClassAdapterDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }
}